// pages/flow/flow.js
import {examineFlowList} from '../../../api/app.js'
import user from '../../../utils/user'
Page({

    /**
      * 页面的初始数据
    */
    data: {
        list: []
    },

    /**
      * 生命周期函数--监听页面加载
    */
    async onLoad () {
        await user.waitLogin()
        await examineFlowList({
            companyId: user.companyId
        }).then(res=>{
            this.setData({
                list: res
            })
        })
    },

    onSetFlow(event){
        wx.navigateTo({
            url: '../set/set?id='+event.currentTarget.dataset.id
        })
    }
})